/**
 * 
 */
package io.dora.demo;

import io.dora.conf.RegistryConfig;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhaohongbo
 * 
 */
public class DemoProvider {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				"spring-config-provider.xml");
		HelloRpc hp = (HelloRpc) context.getBean("helloRpc");
		System.out.println(hp.echoHello("zhaohongbo"));

		RegistryConfig rsc = (RegistryConfig) context.getBean("dazzleRegistry");
		System.out.println(rsc.getUrl());

		synchronized (DemoProvider.class) {
			while (true) {
				try {
					DemoProvider.class.wait();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}
	}

}
